﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>jQEditor</title>
<style>
body {width:950px;margin:0 auto;position:relative;}
.hidden{display:none;}
</style>
<link rel="stylesheet" type="text/css" href="./skins/skin_base.css" />
</head>
<body>
<div style="width:800px;margin-left:0px;">
<div style="height:100px;"></div>
<h3>jQEditor</h3>
<form onsubmit="return false;">

<div id="demo" class="jqeditor"></div>

<textarea name="content" id="content" class="hidden">

</textarea>
<br />
<input type="button" value="提 交" onclick="check(this)" />
</form>

</div>
<script>
var JQEDEBUG = true, g_filterExternal=1;
</script>
<script src="./lib/jquery-1.4.2.min.js"></script>
<script src="./lib/swfupload.js" type="text/javascript"></script>
<script src="./src/core.js"></script>
<script src="./src/config.js"></script>
<script src="./src/icons.js"></script>
<script src="./src/lang/zh-cn.js"></script>
<script src="./src/mod/mod.utils.js"></script>
<script src="./src/mod/mod.event.js"></script>
<script src="./src/mod/mod.selection.js"></script>
<script src="./src/mod/mod.toolbar.js"></script>
<script src="./src/mod/mod.panel.js"></script>
<script src="./src/mod/mod.confirm.js"></script>
<script src="./src/mod/mod.menu.js"></script>
<script src="./src/mod/mod.history.js"></script>
<script src="./src/mod/mod.message.js"></script>
<script src="./src/plugin/event.baike-title.js"></script>
<script src="./src/plugin/plugin.table.js"></script>
<script src="./src/plugin/plugin.source.js"></script>
<script src="./src/plugin/plugin.history.js"></script>
<script src="./src/plugin/plugin.menus.js"></script>
<script src="./src/plugin/plugin.resize.js"></script>
<script src="./src/plugin/plugin.fixedtoolbar.js"></script>
<script src="./src/plugin/plugin.baikelink.js"></script>
<script src="./src/plugin/plugin.title.js"></script>
<script src="./src/plugin/plugin.shortcut-menu.js"></script>
<script src="./src/plugin/plugin.cleanup.js"></script>
<script src="./src/plugin/plugin.bold.js"></script>
<script src="./src/plugin/plugin.video.js"></script>
<script src="./src/plugin/plugin.specialchar.js"></script>
<script src="./src/plugin/plugin.justifyleft.js"></script>
<script src="./src/plugin/plugin.esc.js"></script>
<script src="./src/plugin/plugin.hdimage.js"></script>
<script src="./src/plugin/filter.default.js"></script>
<script src="./src/plugin/filter.baike.js"></script>
<script src="./src/plugin/filter.xhtml.js"></script>
<script src="./src/plugin/filter.xss.js"></script>
<script src="./src/plugin/event.disable-plugin.js"></script>
<script src="./src/plugin/event.enterkey.js"></script>
<script src="./src/plugin/event.shortcutkeys.js"></script>
<script src="./src/plugin/event.append-p.js"></script>
<script src="./src/plugin/event.paste.js"></script>
<script src="./src/plugin/event.drag-image.js"></script>
<script src="./src/plugin/plugin.dialog.js"></script>
<script src="./src/plugin/plugin.link.js"></script>
<script srcl="./src/plugin/plugin.reference.js"></script>
<script>
function check(form){
	var content = jQEditor.getSubmitHtml('demo');
	alert(content);
	return false;
}
$.editor({
	id: 'demo',
	contentId: 'content',
	PasteToText: false,
	AutoCleanup: true,
	video_whiteList : ['tudou.com','youku.com'],
	toolbar: [
			'Preview','Save','Undo','Redo','Cut','Copy','Paste',
			'FontSize','Bold','ForeColor','JustifyLeft','H1',
			'BaikeLink','Link','HdImage','MultiImage',
			'Video','InsertTable','SpecialChar','Code','Source'
		]
});
</script>

<p id="p1"><b>hello</b> world!</p>
<script>
var p1 = document.getElementById('p1');
var helloNode = p1.firstChild.firstChild;
var worldNode = p1.lastChild;
var range = document.createRange();
range.setStart(helloNode,2);
range.setEnd(worldNode,3);
//var fragment = range.extractContents();
//p1.parentNode.appendChild(fragment);
//alert(fragment.firstChild.);
//range.insertNode(fragment.firstChild);

var span = document.createElement('span');
span.style.backgroundColor = 'yellow';
range.surroundContents(span);
</script>

<iframe src="a.html" width="600" height="300"></iframe>
</body>
</html>
